package com.lingchou.cloud.process.client.config;

import com.lingchou.cloud.process.api.dto.constant.QueueNameConstant;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 队列声明
 */
@Configuration
public class MqConfig {

    /**
     * 请销假队列
     *
     * @return Queue
     */
    @Bean
    public Queue leaveEventQueue() {
        return new Queue(QueueNameConstant.LEAVE_EVENT_QUEUE);
    }

    /**
     * 派车申请队列
     *
     * @return Queue
     */
    @Bean
    public Queue carApplyEventQueue() {
        return new Queue(QueueNameConstant.CAR_APPLY_EVENT_QUEUE);
    }

    /**
     * 家属申请队列
     *
     * @return Queue
     */
    @Bean
    public Queue familyEventQueue() {
        return new Queue(QueueNameConstant.FAMILY_EVENT_QUEUE);
    }
}
